﻿using System;

namespace TemplateMethod
{
    abstract class TestPaper
    {
        public void Question1()
        {
            Console.WriteLine("问题1");
        }

        public void Question2()
        {
            Console.WriteLine("问题2");
        }

        public abstract string Answer1();

        public abstract string Answer2();

        public void DoTest()
        {
            Console.WriteLine("考试：");
            this.Question1();
            Console.WriteLine(this.Answer1());
            this.Question2();
            Console.WriteLine(this.Answer2());
        }
    }
}
